package com.brillilab.domain.enums.experiment;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum PlateTypeEnum {
    PORE_PLATE(1,"pore_plate"),GUM_PLATE(2,"gum_plate"),CULTURE_DISH(3,"culture_dish"),CULTURE_BOTTLER(4,"culture_bottler");
    private Integer value;
    private String name;

    public static Integer getValue(String name){
        for (PlateTypeEnum typeEnum : PlateTypeEnum.values()){
            if(typeEnum.getName().equals(name)){
                return typeEnum.getValue();
            }
        }
        return null;
    }

    public static String getName(Integer value){
        for (PlateTypeEnum typeEnum : PlateTypeEnum.values()){
            if(typeEnum.getValue().equals(value)){
                return typeEnum.getName();
            }
        }
        return null;
    }
}
